% tempOne = ones(10);
rank = 3;
b = rand(10,rank);
c = rand(rank,10);
tempOne = b*c;
v_t=[];
v_tt = mean(tempOne)';
for i=1:rank
    v_t1 = [v_t,v_tt];
end
v_t = orth(v_t1);
[u_k e_k v_k] = svd((tempOne*v_t)'*(tempOne*v_t));
v = v_t*v_k';
e = sqrt(e_k);
u = (tempOne*v_t)*v_k*(inv(e));
final_r = u*e*v';